//
//  YFCamera.h
//  CamerDemo
//
//  Created by Winny Zhang on 2019/4/1.
//  Copyright © 2019 Winny Zhang. All rights reserved.
//

#import <UIKit/UIKit.h>
@class YFCameraViewController;
@class YFPlayer;


@interface YFCamera : NSObject

/**
 相机
 */
@property (nonatomic, strong) YFCameraViewController *camera;

/**
 录制视频最大描述， 默认 15秒
 */
@property (nonatomic, assign) NSInteger maxSeconds;

/**
 只是照相
 */
@property (nonatomic, assign) BOOL isTakePhoto;


/**
 初始化相机

 @return 相机
 */
+ (instancetype)camera;

/**
 启用相机
 */
- (void)show;

/**
 完成回调

 @param imageCompletion 返回照片
 @param videoCompletion 返回视频
 */
- (void)completedWithImage:(void(^_Nullable)(UIImage * _Nullable image))imageCompletion
                 withVideo:(void(^_Nullable)(UIImage * _Nullable firstFrameImage, NSURL * _Nullable videoURL,long long duration))videoCompletion;

@end

